
* Stata .do file for Eyal Rubinson and Nizan Feldman "Partnering for Success: NATO's Approach to Enhancing Strategic Relations with Partner Countries"  
* https://doi.org/10.1080/09662839.2025.2542866

* European Security*
* Please send any questions or comments to nfeldman@poli.haifa.ac.il

*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*** Replication Code for Tables  in the  Main Text and Appendix
*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

*****Table 2****
 sort cow year

asdoc olog  f.new_d  share_of_gdp  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year , cluster( cow),  nest replace 

asdoc olog f.new_d gmi2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant  i.year , cluster( cow), nest append 

asdoc olog f.new_d milex_indi  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant  i.year , cluster( cow), nest append

asdoc olog f.new_d personnel_indi  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant  i.year , cluster( cow), nest append

asdoc olog f.new_d weapons_indi  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant i.year , cluster( cow), nest append

asdoc olog f.new_d  MMP2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant i.year, cluster( cow), nest append 




****Figure 1. Average Marginal Effect****

ologit f.new_d MMP2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy ln_distance_s Europe ln_total_expenditure_constant ln_gdp_cunstant i.year, cluster(cow)

margins, dydx(MMP2) level(90)

marginsplot, ///
    recast(scatter) ///
    ciopts(recast(rcap)) ///
    yline(0, lcolor(red) lpattern(dash)) ///
    title("Marginal Effect of MMP2 (90% Confidence Interval)") ///
    ytitle("Average Marginal Effect") ///
    legend(off)

	
*** Figure 2. Controlling for governance stability. ***


olog f.new_d gmi2  ge ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year , cluster(cow) 
estimates store model1


olog f.new_d weapons_indi ge ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year, cluster( cow) 
estimates store model2



olog new_d  MMP2  ge ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year  i.year , cluster( cow)
estimates store model3




coefplot (model1, xscale(range(-1 1))) ///
         (model2, xscale(range(-1 1))) ///
         (model3, xscale(range(-1 5))), ///
         keep(gmi2 weapons_indi MMP2 ge ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant) ///
         xline(0) msymbol(s) mfcolor(white) levels(95 90) ///
         legend(order(1 "95" 2 "90") row(1)) drop(_cons) ///
         byopts(row(1) cols(3)) ///
         order(gmi2 weapons_indi MMP2 ge) ciopts(lcolor(red))
graph save "combined_graph 2.gph", replace
graph export "combined_graph .png", as(png) replace






***** Figure 3. Excluding MAP members*****  


olog f.new_d gmi2  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year , cluster(cow) 
estimates store model4


olog f.new_d weapons_indi ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year , cluster(cow) 
estimates store model5

olog f.new_d  MMP2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant    i.year , cluster(cow) 
estimates store model6


coefplot (model4, xscale(range(-1 1))) ///
         (model5, xscale(range(-1 1))) ///
         (model6, xscale(range(-1 4))), ///
         keep(gmi2 weapons_indi MMP2  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant) ///
         xline(0) msymbol(s) mfcolor(white) levels(95 90) ///
         legend(order(1 "95" 2 "90") row(1)) drop(_cons) ///
         byopts(row(1) cols(3)) ///
         order(gmi2   weapons_indi MMP2) ciopts(lcolor(red))

graph save "combined_graph.gph", replace
graph export "combined_graph.png", as(png) replace



**** Figure 4. Fixed Effects ***

feologit f_new_d  gmi2  ln_gdp_per_capita_constant urban_pop_per   ln_total_expenditure_constant   ln_gdp_cunstant i.year
estimates store model10

xtologit  f.new_d weapons_indi  ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  polity2   i.year  i.cow, vce(cluster cow)
estimates store model11

feologit f_new_d  MMP2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_total_expenditure_constant   ln_gdp_cunstant  
estimates store model2


coefplot model10 || model11 || model2 , keep(share_of_gdp gmi2 milex_indi personnel_indi weapons_indi MMP2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  polity2) xline(0)  msymbol(s) mfcolor(white) levels(95 90) legend(order(1 "95" 2 "90") row(1))drop(_cons) byopts(row(1)) ///
order(share_of_gdp gmi2 milex_indi personnel_indi weapons_indi MMP2) ciopts(lcolor(red))



coefplot (model10, xscale(range(-1 1))) ///
         (model11, xscale(range(-1 1))) ///
         (model2, xscale(range(-1 90))), ///
         keep(gmi2 weapons_indi MMP2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per polity2) ///
         xline(0) msymbol(s) mfcolor(white) levels(95 90) ///
         legend(order(1 "95" 2 "90") row(1)) drop(_cons) ///
         byopts(row(1) cols(3)) ///
         order(gmi2 weapons_indi MMP2 ) ciopts(lcolor(red))
graph save "combined_graph.gph", replace
graph export "combined_graph.png", as(png) replace




*** Figure 5. Random Effects ***

xtologit f.new_d  gmi2  ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant  i.year , vce(cluster cow)
estimates store model7


xtologit  f.new_d weapons_indi ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant  i.year  , vce(cluster cow)
estimates store model8

xtologit f.new_d  MMP2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant  i.year , vce(cluster cow)
estimates store model9

coefplot model7 || model8 || model9, keep(gmi2 weapons_indi MMP2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  polity2) xline(0)  msymbol(s) mfcolor(white) levels(95 90) legend(order(1 "95" 2 "90") row(1))drop(_cons) byopts(row(1)) ///
order( gmi2 weapons_indi MMP2) ciopts(lcolor(red))


coefplot (model7, xscale(range(-1 1))) ///
         (model8, xscale(range(-1 1))) ///
         (model9, xscale(range(-1 10))), ///
         keep(gmi2 weapons_indi MMP2 ln_gdp_per_capita_constant urban_pop_per v2x_polyarchy  ln_distance_s  Europe ln_total_expenditure_constant   ln_gdp_cunstant) ///
         xline(0) msymbol(s) mfcolor(white) levels(95 90) ///
         legend(order(1 "95" 2 "90") row(1)) drop(_cons) ///
         byopts(row(1) cols(3)) ///
         order(gmi2 weapons_indi MMP2 ) ciopts(lcolor(red))
graph save "combined_graph.gph", replace
graph export "combined_graph.png", as(png) replace





************ Online Appendix ****************

******Table A2. Including regional dummies******


asdoc olog  f.new_d  share_of_gdp Europe  Africa MED Asia Indo_Pacific American ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  i.year , cluster( cow),  nest replace 

asdoc olog f.new_d gmi2 Europe  Africa MED Asia Indo_Pacific American ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per v2x_polyarchy  i.year , cluster( cow), nest append 

asdoc olog f.new_d milex_indi  Europe  Africa MED Asia Indo_Pacific American ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  i.year , cluster( cow), nest append

asdoc olog f.new_d personnel_indi  Europe  Africa MED Asia Indo_Pacific American ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  i.year , cluster( cow), nest append

asdoc olog f.new_d weapons_indi  Europe  Africa MED Asia Indo_Pacific American ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  i.year , cluster( cow), nest append

asdoc olog new_d  MMP2 Europe  Africa MED Asia Indo_Pacific American ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per v2x_polyarchy i.year, cluster( cow), nest append 


****** Table A3. Controlling for Productive Capacities Index****

asdoc olog  f.new_d  share_of_gdp Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant p_c_i  v2x_polyarchy  i.year , cluster( cow),  nest replace 

asdoc olog f.new_d gmi2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant p_c_i  v2x_polyarchy   i.year , cluster( cow), nest append 

asdoc olog f.new_d milex_indi  Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant p_c_i  v2x_polyarchy   i.year , cluster( cow), nest append

asdoc olog f.new_d personnel_indi  Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant p_c_i  v2x_polyarchy   i.year , cluster( cow), nest append

asdoc olog f.new_d weapons_indi  Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant p_c_i  v2x_polyarchy i.year , cluster( cow), nest append

asdoc olog new_d  MMP2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant p_c_i v2x_polyarchy  i.year, cluster( cow), nest append 

****** Table A4. Controlling for PSAV ****

asdoc olog f.new_d gmi2 estimate Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant  v2x_polyarchy  urban_pop_per i.year , cluster( cow), nest replace

asdoc olog f.new_d weapons_indi estimate Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  i.year , cluster( cow), nest append

asdoc olog new_d  MMP2 Europe ln_distance_s  estimate ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per v2x_polyarchy  i.year, cluster( cow), nest append 


****** Table A5. Arellano-Bond ******

xtabond  f.new_d gmi2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  year_1990-year_2023 , lags(2) noconstant
				
xtabond  f.new_d  weapons_indi Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  year_1990-year_2023 , lags(2) noconstant

xtabond  new_d MMP2 Europe ln_distance_s ln_gdp_per_capita_constant ln_gdp_cunstant ln_total_expenditure_constant urban_pop_per  v2x_polyarchy  year_1990-year_2023 , lags(2) noconstant



*** Table A6. Bivariate Models ***

asdoc olog f.new_d gmi2  i.year , cluster( cow), nest replace  

asdoc olog f.new_d weapons_indi  i.year , cluster( cow), nest append

asdoc olog f.new_d  MMP2 i.year, cluster( cow), nest append 

	
	
***Figure A1. Average Treatment Effects on the Treated (ATETs) by Cohort Over Time
***To replicate this figure, please use Data File 2, which is available upon request from Nizan Feldman at 
***nfledman@poli.haifa.ac.il.***


xthdidregress ra (MMP ln_GDP_PERCAPITA_CURRENT ln_dist ln_Militery_EXP ln_GDP_CURRENT) (treated), group(cow)
estat aggregation, cohort	

estat atetplot



***Table A7. Hurdle Model***

*****churdle******
**To replicate this figure, please use Data File 2, which is available upon request from Nizan Feldman at ***

churdle  exponential new_d gmi2 Europe_1 ln_dist ln_GDP_Constant ln_GDP_PERCAPITA_Constant  Urban_POP v2x_delibdem year_1990-year_2023, select( gmi2 Europe_1 ln_GDP_Constant ln_GDP_PERCAPITA_Constant v2x_delibdem  ln_dist Urban_POP year_1990-year_2023  ) ll(0) nolog
	
churdle exponential new_d weapons_indi Europe_1 ln_dist ln_GDP_Constant ln_GDP_PERCAPITA_Constant  v2x_delibdem Urban_POP year_1990-year_2023, select( weapons_indi Europe_1 ln_dist ln_GDP_Constant ln_GDP_PERCAPITA_Constant Urban_POP v2x_delibdem year_1990-year_2023 ) ll(0) nolog
	
churdle exponential new_d MMP2 Europe_1 ln_dist ln_GDP_Constant ln_GDP_PERCAPITA_Constant  v2x_delibdem Urban_POP year_1990-year_2023, select( MMP2 Europe_1 ln_GDP_Constant ln_GDP_PERCAPITA_Constant v2x_delibdem ln_dist Urban_POP year_1990-year_2023 ) ll(0) nolog











	
	
